* {
      padding: 0;
      margin: 0;
      box-sizing: border-box;
    }
    html {
      height: 100%;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
    body {
      background-color: #f5f5fa;
      display: flex;
      height: inherit;
      flex-direction: column;
      align-items: center;
      padding-top: 20px;
    }
    .container {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 20px;
      max-width: 1200px;
      width: 70%;
    }
    h1 {
      color: #3a3ab3;
      margin-bottom: 20px;
      text-transform: uppercase;
      text-align: center;
      width: 100%;
    }
    .content {
      display: flex;
      flex-direction: column;
      text-align: center;
      background-color: #f5f5fa;
      flex: 2;
      min-width: 300px;
      max-width: 600px;
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    .preview-section {
      display: flex;
      row-gap: 20px;
      flex: 1;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    .preview {
      width: 100%;
      max-width: 100%;
      aspect-ratio: 16 / 9;
      overflow: hidden;
      background-color: #fff;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
      border-radius: 6px;
    }
    .preview img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
    label {
      cursor: pointer;
      margin-bottom: 20px;
    }
    button {
      cursor: pointer;
      font-family: inherit;
      display: flex;
      align-items: center;
      justify-content: center;
      column-gap: 8px;
    }
    #upload {
      margin: 0;
      font-size: 14px;
      height: 44px;
      width: 200px;
      pointer-events: none;
    }
    i {
      font-size: 22px;
    }
    .btn-primary {
      font-size: 16px;
      height: 50px;
      width: 100%;
      font-weight: 600;
      color: #fff;
      text-transform: uppercase;
      margin-top: 15px;
      border-radius: 6px;
      border: none;
      background-color: #5f5ff0;
      transition: background-color 0.3s;
    }
    .btn-primary:hover {
      background-color: #4a4ae0;
    }
    :is(button, [for=filepicker]):active {
      transform: scale(0.98);
    }
    .sidebar {
      display: flex;
      flex-direction: column;
      min-width: 300px;
      max-width: 400px;
      color: #2e2e88;
      flex: 1;
      row-gap: 15px;
      background-color: #fff;
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    .label {
      display: flex;
      align-items: center;
      column-gap: 6px;
      font-weight: 500;
      margin-bottom: 15px;
    }
    .quality-type {
      font-size: 14px;
      display: flex;
      margin-bottom: 4px;
      justify-content: space-between;
    }
    input {
      width: 100%;
    }
    #compressor {
      cursor: pointer;
      margin-bottom: 10px;
    }
    .info-wrap {
      margin-top: 10px;
    }
    .group {
      display: flex;
      align-items: end;
      column-gap: 8px;
      line-height: 22px;
      justify-content: space-between;
      margin-bottom: 8px;
    }
    .group div {
      font-size: 14px;
    }
    .group input {
      border-radius: 5px;
      padding: 0 11px;
      font-size: 16px;
      height: 40px;
      outline: none;
      color: #7e7777;
      border: 1px solid #d4d2d2;
    }
    .wrap label {
      margin-bottom: 0;
    }
    .wrap div {
      margin-bottom: 8px;
    }
    .middle {
      padding: 0 8px;
      height: 40px;
      display: flex;
      align-items: center;
    }
    #ratio:checked + .unlock {
      display: none;
    }
    #ratio:not(:checked) ~ .lock {
      display: none;
    }
    #reset {
      padding: 8px 15px;
      margin-bottom: 15px;
      margin-top: 10px;
      border-radius: 100px;
      background: linear-gradient(#f8f8f8, #d8d8d8);
      text-shadow: 0 1px 0 #fff;
      border: 1px solid #aaa;
      font-size: 14px;
    }
    #reset:active {
      background-color: #e4e4e4;
      background-image: none;
      border-color: #e0e0e0;
      box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
    }
    body:has(.preview:empty) .sidebar {
      opacity: 0.5;
      pointer-events: none;
    }

    @media (max-width: 768px) {
      .container {
        flex-direction: column;
        align-items: center;
      }
      .content, .sidebar {
        width: 100%;
        max-width: 100%;
      }
      h1 {
        font-size: 24px;
      }
    }
    @media (max-width: 376px){
      .container{
        width: 95%;
      }
    }
